package com.hhp.hhptt.controller.controllerjinpeng;

import com.hhp.hhptt.common.Result;
import com.hhp.hhptt.entity.ExamineeEntiry;
import com.hhp.hhptt.service.IExamineeInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class ExamineeController {

    @Autowired
    IExamineeInformationService examineeInformationService;

    @PostMapping("/information")
   public Result ExamineeInformation(ExamineeEntiry employee){
    //public Result ExamineeInformation(@RequestBody ExamineeEntiry employee){JSON类型数据
        boolean save = examineeInformationService.save(employee);
        String result="提交失败！";
        if (save){
            result="提交成功，感谢您的配合！";
        }
        return Result.success(result);
    }
}
